-- GENERATED SPELL FOR [Simon Unit] --


function spell0_23385(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(32614,pUnit)
pUnit:RegisterEvent('Sorts_23385', 586, 1)
end

function spell1_23385(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(34447,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23385', 555, 1)
end

function spell2_23385(pUnit, Event) --@Energy Surge,n/a--
pUnit:FullCastSpellOnTarget(36508,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23385', 5000, 1)
end

function Sorts_23385(pUnit, Event)
local choix_sorts_23385 = math.random(0, 2)
if choix_sorts_23385 == 0 then
pUnit:RegisterEvent('spell0_23385', 1, 1)
end
if choix_sorts_23385 == 1 then
pUnit:RegisterEvent('spell1_23385', 1, 1)
end
if choix_sorts_23385 == 2 then
pUnit:RegisterEvent('spell2_23385', 1, 1)
end
end

function mob23385_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23385', math.random(1500, 3000), 1)
end

function mob23385_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23385_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23385_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23385, 1, 'mob23385_Action')
RegisterUnitEvent(23385, 2, 'mob23385_Leave')
RegisterUnitEvent(23385, 3, 'mob23385_Kill')
RegisterUnitEvent(23385, 4, 'mob23385_Die')
